<template>
  <div class="vi-edit">
    <div class="vi-edit-canvas">
      <cross-iframe v-if="true"/>
      <draggable-canvas v-else/>
    </div>
    <props />
  </div>
</template>

<script>
import Props from '@/components/props/props'
import CrossIframe from '@/components/canvas/crossIframe/index'
import DraggableCanvas from '../../components/canvas/index'
export default {
  name: 'editor',
  components: {DraggableCanvas, CrossIframe, Props},
  created() {
    // document.addEventListener('dragenter', () => {
    //   // console.log('parent dragenter')
    //   document.getElementById('iframe').contentWindow.postMessage(
    //     {
    //       type: 'onDragleave',
    //       data: {},
    //     },
    //     '*'
    //   )
    // })
  }
}
</script>
<style scoped lang="less">
.vi-edit {
    width: 100%;
    height: 100%;
    display: flex;
    &-canvas {
        flex: 1;
    }
}
</style>
